<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
 
// import Joomla view library
jimport('joomla.application.component.view');
 
/**
 * AnJoLinA View
 */
class ajleventlistViewinfo extends JView
{
	
	/**
	 * Display the view
	 */
	public function display($tpl = null)
	{
		
		$this->state		= $this->get('State');
		$this->items		= $this->get('Items');
		$this->pagination	= $this->get('Pagination');

		// Check for errors.
		if (count($errors = $this->get('Errors'))) {
			JError::raiseError(500, implode("\n", $errors));
			return false;
		}
		$this->addToolbar();
		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @since	1.6
	 */
	protected function addToolbar()
	{

		$title = 'AnJoLinA Plugin: Eventlist';
		JToolBarHelper::title($title, 'refresh.png');
		
		// Prepare the toolbar with AnJoLinA Preferences.
		JToolBarHelper::divider();
		JToolBarHelper::preferences('com_anjolina');

	}
	
	

	
	/**
	 * Method to set up the document properties
	 *
	 * @return void
	 */
	protected function setDocument() 
	{
		$document = JFactory::getDocument();
	}
}